% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/matrix.R
\name{add_empty_rows}
\alias{add_empty_rows}
\alias{add_empty_cols}
\title{Add empty observations by rownames or colnames}
\usage{
add_empty_rows(x, missing)

add_empty_cols(x, missing)
}
\arguments{
\item{x}{A matrix}

\item{missing}{A vector of names to expand \code{x} col/row-wise.}
}
\description{
Given a matrix and a vector of either rownames or colnames, add a
empty rows/columns of NA.
}
\examples{
x <- matrix(1:3, 3, 1, dimnames = list(letters[1:3], "1"))

add_empty_rows(x, letters[4:5])
add_empty_cols(x, c("2", "3"))

}
